import 'package:amoy_ticket/utils/router/getRouteConfig.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class TestOneLogic extends GetxController {
  void jump() => Get.toNamed(RouteConfig.testTwo);
}

class TestOneBinding extends Bindings {
  @override
  void dependencies() {
    Get.lazyPut(() => TestOneLogic());
  }
}

class TestOnePage extends StatelessWidget {
  final logic = Get.put(TestOneLogic());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('页面一')),
      body: Center(child: Text('页面一', style: TextStyle(fontSize: 30))),
      floatingActionButton: FloatingActionButton(
        onPressed: () => logic.jump,
        child: Icon(Icons.arrow_forward),
      ),
    );
  }
}
